﻿<%
Response.Buffer = True
%>
<!--#include file = bazifunction.asp -->
<!--#include file = baziNongLi.asp -->
<!--#include file = baziGongLiNongLi.asp -->

<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<title>太极神数 电子生成系统</title>
<meta content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
<STYLE type="text/css">
<!--
a:link {text-decoration: none; font-family: AdobeSm; color: #000000 }
a:visited {text-decoration: none; color: #000000 }
A:hover {COLOR: green; FONT-FAMILY: "宋体,MingLiU"; TEXT-DECORATION: underline}
body {font-size: 10px; font-family: 宋体,MingLiU, Arial;color: #000000}
TD {FONT-SIZE: 10px; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000;line-height: 120%;table-layout:fixed;word-break:break-all}
p {FONT-SIZE: 10px; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
input {FONT-SIZE: 10px; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
body {margin-top: 0; margin-bottom: 0;margin-left:0;margin-right:0; color: #000000}
select {FONT-SIZE: 10px;font-family: 宋体}
option {FONT-SIZE: 10px;font-family: 宋体}
textarea {FONT-SIZE: 10px;font-family: 宋体}
-->
</STYLE>
</head>
<%
ON ERROR RESUME NEXT
nian=chkhtm(trim(request("nian")))
yue=chkhtm(trim(request("yue")))
ri=chkhtm(trim(request("ri")))
shi=chkhtm(trim(request("shi")))
xb=chkhtm(trim(request("xb")))
Run=trim(request("Run"))
yyyy=trim(request("yyyy"))
NewOld=trim(chkhtm(request("NewOld")))
if NewOld="NEW" then
	NewD=yyyy&"-"&Yue&"-"&ri
	Set hlxNongGong = New hlxNongLiGongLi
	OldD=hlxNongGong.GongToNong(NewD)
	set hlxNongGong=nothing
	NewOLDXX="新历:"&newd&"&nbsp;农历:"&oldd
	oldd=replace(oldd,"闰","")
	aaa=split(oldd,"-")
	nian=aaa(0)
	yyyy=aaa(0)
	yue=aaa(1)
	ri=trim(aaa(2))
end if

if NewOld="OLD" then
	OLDD=yyyy&"-"&Yue&"-"&ri
	Ntype=Run
	Set hlxNongGong = New hlxNongLiGongLi
	NewD=hlxNongGong.NongToGong(OLDD,Ntype)
	set hlxNongGong = nothing
	NewOLDXX="农历:"&OLDD&"&nbsp;新历:"&NewD
	oldd=replace(oldd,"闰","")
	aaa=split(oldd,"-")
	nian=aaa(0)
	yyyy=aaa(0)
	yue=aaa(1)
	ri=trim(aaa(2))
end if
if NewOLD="OLD" then
	if ri="31" then 
		Response.Write "<script>alert('农历没有３１号，请返回！');</script> <meta http-equiv='refresh' content='0; url=javascript:window.history.go(-1);'>"
		Response.end 'ASP停止
	end if
end if

if (not isNumeric(yue)) then yue=0
if (not isNumeric(ri)) then ri=0
if (not isNumeric(shi)) then shi=0
if (not isNumeric(yyyy)) then yyyy=""
if (not isNumeric(nian)) then nian=0



if yyyy<>"" then
	Set objChinaDay = New ChinaDay 
	cddd=yyyy&"-5-5"
	Call objChinaDay.Action(cddd,sDay,sWeekDay,sChinaYear,sChinaDay,sChinaAni) 
	Set objChinaDay = Nothing
	TianGanShu=TianGanFC(left(sChinaYear,1))
	nian=diziFC(left(right(sChinaYear,2),1))
end if

allshu=clng(nian)+clng(TianGanShu)
allshu=allshu mod 12
if allshu=0 then allshu=12
bms=allshu
Response.flush 
%>
<body>
<br>
<div align="center">
	<table border="0" cellpadding="5" cellspacing="0" width="100%" id="table1">
		<form method="get" action="?">
		<tr>
			<td>
			
				<p>
				<select size="1" name="NewOld">
				<option selected value='OLD'>农历</option>
				<option value='NEW'>新历</option>
				</select><select size="1" name="yyyy">
				<%
				 if yyyy="" then yyyy=1980
				 for ii=year(now())-80 to year(now())+1
					y=clng(ii mod 60 )
					if y<4 then y=y+60
					y=y-4
					NTianGan=nianGZ(Y)
				%>
				<option <% if clng(yyyy)=clng(ii) then Response.Write "selected"%> value=<%=ii%>><%=ii%>&nbsp;<%=nianGZ(y)%>年</option>
				<%
				next
				%>
				</select> <br /><label><input type="checkbox" name="Run" <% if Run="闰" then Response.Write " checked "%> value="闰">闰月</label><select size="1" name="yue">
				<option value=1 <% if clng(yue)="1" then Response.Write " selected "%>>1.一月</option>
				<option value=2 <% if clng(yue)="2" then Response.Write " selected "%>>2.二月</option>
				<option value=3 <% if clng(yue)="3" then Response.Write " selected "%>>3.三月</option>
				<option value=4 <% if clng(yue)="4" then Response.Write " selected "%>>4.四月</option>
				<option value=5 <% if clng(yue)="5" then Response.Write " selected "%>>5.五月</option>
				<option value=6 <% if clng(yue)="6" then Response.Write " selected "%>>6.六月</option>
				<option value=7 <% if clng(yue)="7" then Response.Write " selected "%>>7.七月</option>
				<option value=8 <% if clng(yue)="8" then Response.Write " selected "%>>8.八月</option>
				<option value=9 <% if clng(yue)="9" then Response.Write " selected "%>>9.九月</option>
				<option value=10 <% if clng(yue)="10" then Response.Write " selected "%>>10.十月</option>
				<option value=11 <% if clng(yue)="11" then Response.Write " selected "%>>11.十一月</option>
				<option value=12 <% if clng(yue)="12" then Response.Write " selected "%>>12.十二月</option>
				</select> <select size="1" name="ri">
				<option value=1 <% if clng(ri)="1" then Response.Write " selected "%>>1.一</option>
				<option value=2 <% if clng(ri)="2" then Response.Write " selected "%>>2.二</option>
				<option value=3 <% if clng(ri)="3" then Response.Write " selected "%>>3.三</option>
				<option value=4 <% if clng(ri)="4" then Response.Write " selected "%>>4.四</option>
				<option value=5 <% if clng(ri)="5" then Response.Write " selected "%>>5.五</option>
				<option value=6 <% if clng(ri)="6" then Response.Write " selected "%>>6.六</option>
				<option value=7 <% if clng(ri)="7" then Response.Write " selected "%>>7.七</option>
				<option value=8 <% if clng(ri)="8" then Response.Write " selected "%>>8.八</option>
				<option value=9 <% if clng(ri)="9" then Response.Write " selected "%>>9.九</option>
				<option value=10 <% if clng(ri)="10" then Response.Write " selected "%>>10.十</option>
				<option value=11 <% if clng(ri)="11" then Response.Write " selected "%>>11.十一</option>
				<option value=12 <% if clng(ri)="12" then Response.Write " selected "%>>12.十二</option>
				<option value=13 <% if clng(ri)="13" then Response.Write " selected "%>>13.十三</option>
				<option value=14 <% if clng(ri)="14" then Response.Write " selected "%>>14.十四</option>
				<option value=15 <% if clng(ri)="15" then Response.Write " selected "%>>15.十五</option>
				<option value=16 <% if clng(ri)="16" then Response.Write " selected "%>>16.十六</option>
				<option value=17 <% if clng(ri)="17" then Response.Write " selected "%>>17.十七</option>
				<option value=18 <% if clng(ri)="18" then Response.Write " selected "%>>18.十八</option>
				<option value=19 <% if clng(ri)="19" then Response.Write " selected "%>>19.十九</option>
				<option value=20 <% if clng(ri)="20" then Response.Write " selected "%>>20.廿十</option>
				<option value=21 <% if clng(ri)="21" then Response.Write " selected "%>>21.廿一</option>
				<option value=22 <% if clng(ri)="22" then Response.Write " selected "%>>22.廿二</option>
				<option value=23 <% if clng(ri)="23" then Response.Write " selected "%>>23.廿三</option>
				<option value=24 <% if clng(ri)="24" then Response.Write " selected "%>>24.廿四</option>
				<option value=25 <% if clng(ri)="25" then Response.Write " selected "%>>25.廿五</option>
				<option value=26 <% if clng(ri)="26" then Response.Write " selected "%>>26.廿六</option>
				<option value=27 <% if clng(ri)="27" then Response.Write " selected "%>>27.廿七</option>
				<option value=28 <% if clng(ri)="28" then Response.Write " selected "%>>28.廿八</option>
				<option value=29 <% if clng(ri)="29" then Response.Write " selected "%>>29.廿九</option>
				<option value=30 <% if clng(ri)="30" then Response.Write " selected "%>>30.三十</option>
				<option value=31 <% if clng(ri)="30" then Response.Write " selected "%>>31.三一</option>
				</select>日 
				 
				<select size="1" name="SHI">
				<option value=1 <% if clng(shi)="1" then Response.Write " selected "%>>1.子(23-1时)</option>
				<option value=2 <% if clng(shi)="2" then Response.Write " selected "%>>2.丑(1-3时)</option>
				<option value=3 <% if clng(shi)="3" then Response.Write " selected "%>>3.寅(3-5时)</option>
				<option value=4 <% if clng(shi)="4" then Response.Write " selected "%>>4.卯(5-7时)</option>
				<option value=5 <% if clng(shi)="5" then Response.Write " selected "%>>5.辰(7-9时)</option>
				<option value=6 <% if clng(shi)="6" then Response.Write " selected "%>>6.巳(9-11时)</option>
				<option value=7 <% if clng(shi)="7" then Response.Write " selected "%>>7.午(11-13时)</option>
				<option value=8 <% if clng(shi)="8" then Response.Write " selected "%>>8.未(13-15时)</option>
				<option value=9 <% if clng(shi)="9" then Response.Write " selected "%>>9.申(15-17时)</option>
				<option value=10 <% if clng(shi)="10" then Response.Write " selected "%>>10.酉(17-19时)</option>
				<option value=11 <% if clng(shi)="11" then Response.Write " selected "%>>11.戌(19-21时)</option>
				<option value=12 <% if clng(shi)="12" then Response.Write " selected "%>>12.亥(21-23时)</option>
				</select> <select size="1" name="xb">
				<option value="男" <% if xb="男" then Response.Write " selected "%>>男</option>
				<option value="女" <% if xb="女" then Response.Write " selected "%>>女</option>
				</select>
					<br /><input type="submit" value="提交"><input type="reset" value="重置">
				<%
				Set objChinaDay = New ChinaDay 
				cddd=date()
				Call objChinaDay.Action(cddd,sDay,sWeekDay,sChinaYear,sChinaDay,sChinaAni) 
				Set objChinaDay = Nothing
				%>
					<br />
				　今日：<%=sDay%>&nbsp;<%=sWeekDay%>&nbsp;<%=sChinaYear%><%=sChinaDay%>&nbsp;
				<%
				
				
				c=clng(left(year(now()),2))
				y=clng(right(year(now()),2))
				m=Month(now())
				if m="1" then m=13
				if m="2" then m=14
				G=(4*c)+(int(c/4))+(5*y)+(int(y/4))+(int((3*(m+1)))/5)+day(now())-3
				
				if m="1" or m="3" or m="5" or m="7" or m="9" or m="11" then
					ds=0
				else
					ds=6
				end if
				Z = (8*C) + (int(C/4)) + (5*y) + (int(y/4)) + (int(3*(M+1)/5)) + day(now()) + 7 + ds
				G=g mod 10
				if G=0 then G=10
				dzs=z mod 12
				if dzs=0 then dzs=12
				Response.Write "("&TianGan(g) & dizi(dzs)&"日)"
				%>
				</p>
			
			</td>
		</tr>
		</form>
	</table>
</div>
<%
if nian="0" or yue="0" or ri="0" or shi="0" then
	Response.end
end if

%>
<div align="center">
	<table border="0" cellpadding="5" cellspacing="0" width="100%" id="table2">
		<tr>
			<td>
				<%
					y=clng(yyyy mod 60 )
					if y<4 then y=y+60
					y=y-4
					NTianGan=nianGZ(Y)

					shicheng=dizi(shi)&"时"
					Response.Write "<font color=red>("&yyyy&")"& NTianGan &"&nbsp;"&yue&"&nbsp;"&ri&"&nbsp;"&shicheng&"["&xb&"]</font>&nbsp;"&NewOLDXX&"&nbsp;"
					Response.Write "<br/><b>生肖</b>:"&shengxiao(nian)&"&nbsp;"
					shiaaa=shi
					yueaaa=yue+2
					
					if clng(shiaaa)>clng(yueaaa) then yueaaa=yueaaa+12
					'Response.Write "yueaaa:"&yueaaa&" |"
					'Response.Write "shiaaa:"&shiaaa&" |"
					yueaaa=yueaaa-shiaaa+1
					'Response.Write yueaaa&"."
					if yueaaa=0 then yueaaa=yue
					'Response.Write yueaaa&"."
					'if clng(yueaaa)>=11 then yueaaa=yueaaa+1
					if clng(yueaaa)>12 then yueaaa=yueaaa mod 12
					'Response.Write yueaaa&"."
					DMDZ=yueaaa
					Response.Write "<b>大命</b>:"&dizi(dmdz)&Zhengwuxing(dmdz)			
					if dizi(dmdz)="寅" and xb="男" then Response.Write "　男身女命 "
					if dizi(dmdz)="亥" and xb="女" then Response.Write "　女命男身 "
					Response.Write "&nbsp;"
					
					ldate=yyyy&"-"&yue&"-"&ri
					Set hlxNongGong = New hlxNongLiGongLi
					ldate=hlxNongGong.NongToGong(ldate,Ntype)
					set hlxNongGong = nothing
					Response.Write "现"&int(datediff("m",ldate,now())/12)&"岁"
										
				%>
			</td>
			<td >
				　</td>
		</tr>
		<tr>
			<td valign=top>
<%
riaaa=ri mod 12
if riaaa=0 then riaaa=12
if clng(ri)<=12 then 
	RIWX=wuxing(ri)
	'Response.Write RIWX
	
else
	ria=left(ri,1)
	rib=right(ri,1)
	riwx=wuxing(ria)&wuxing(rib)
	
end if

if clng(ri)<=12 then 
	RIDZ=dizi(ri)
	rishuJiXiong=shuJiXiong(ri)
	riShuZiJiXiong=shuZiJiXiong(Ri)
	riDuiXiang=Ri
else
	ria=left(ri,1)
	rib=right(ri,1)
	if clng(rib)=0 then rib=10
	ridz=dizi(ria)&dizi(rib)
	rishuJiXiong=shuJiXiong(ria)&shuJiXiong(rib)
	riShuZiJiXiong=shuZiJiXiong(Ria)&shuZiJiXiong(Rib)
	riDuiXiang=clng(Ria)+clng(RiB)
end if

function YingYaShu(shu)
	if clng(shu)<=5 or clng(shu)=>11 then YingYaShu="<font color=999999>阳数</font>"
	if clng(shu)>=6 and clng(shu)<=10 then YingYaShu="<font color=999999>阴数</font>"
end function
%>
<div align="center">
	<table border="0" cellpadding="0" cellspacing="0"   id="table3">
		<tr>
			<td width="25%" align=center>
				<%="年:"&shuJiXiong(nian)&"("&yyyy&")"&YingYaShu(nian)&"<br>"&NTianGan&"<BR><font color=blue>"&wuxing(nian)&"</font>"%>
			</td>
			<td width="25%" align=center>
				<%="月:"&shuJiXiong(yue)&YingYaShu(Yue)&"<br>"&dizi(yue)&"<BR><font color=blue>"&wuxing(yue)&"</font>"%>
			</td>
			<td width="25%" align=center>
				<%="日:"&RI&YingYaShu(riaaa)&"<br>"&ridz&"<BR><font color=blue>"&riwx&"</font>"%>
			</td>
			<td width="25%" align=center>
				<%="时:"&shuJiXiong(shi)&YingYaShu(Shi)&"<br>"&dizi(shi)&"<BR><font color=blue>"&wuxing(shi)&"</font>"%>
			</td>
		</tr>
		
		<tr>

			<td width="25%" align=center><font color="#808080"><%=shuZiJiXiong(nian)%></font></td>
			<td width="25%" align=center><font color="#808080"><%=shuZiJiXiong(yue)%></font></td>
			<td width="25%" align=center><font color="#808080"><%=riShuZiJiXiong%></font></td>
			<td width="25%" align=center><font color="#808080"><%=shuZiJiXiong(shi)%></font></td>
		</tr>
	
<%

					nian=clng(nian)
					if xb="男" and (nian=1 or nian=3 or nian=5 or nian=7 or nian=9 or nian=11) then yx="顺"
					if xb="女" and (nian=1 or nian=3 or nian=5 or nian=7 or nian=9 or nian=11) then yx="逆"
					if xb="男" and (nian=2 or nian=4 or nian=6 or nian=8 or nian=10 or nian=12) then yx="逆"
					if xb="女" and (nian=2 or nian=4 or nian=6 or nian=8 or nian=10 or nian=12) then yx="顺"
					
					if yx="顺" then 
						NianYX=TianXing(nian)
						yuesss=clng(nian)+clng(yue)-1
						'Response.Write yuesss
						if clng(yuesss)>12 then yuesss=yuesss mod 12
						if yuesss=0 then yuesss=12
						YueYX=tianxing(yuesss)
						
						risss=clng(yuesss)+clng(ri)-1
						if clng(risss)>12 then risss=risss mod 12
						if risss=0 then risss=12
						RiYX=tianxing(risss)
						
						shisss=clng(risss)+clng(shi)-1
						if clng(shisss)>12 then shisss=shisss mod 12
						if shisss=0 then shisss=12
						ShiYX=tianxing(shisss)
					else
						NianYX=TianXing(nian)
						niansss=nian
						if clng(niansss)<clng(yue) then niansss=niansss+24
						yuesss=clng(niansss)-clng(yue)+1
						'Response.Write yuesss
						if clng(yuesss)<0 then yuesss=yuesss+13
						if clng(yuesss)>12 then yuesss=yuesss mod 12
						if clng(yuesss)=0 then yuesss=12
						'Response.Write "."&yuesss
						yueYuan=yuesss
						YueYX=tianxing(yuesss)
						if clng(ri)>clng(yuesss) then yuesss=yuesss+24
						risss=clng(yuesss)-clng(ri)+1
						'Response.Write risss&"."
						
						if clng(risss)<0 then risss=risss+13
						'Response.Write risss&"."
						if clng(risss)>12 then risss=risss mod 12
						if clng(risss)=0 then risss=yueyuan
						'Response.Write "risss:"&risss&" "
						RiYX=tianxing(risss)
						
						if clng(risss)<clng(shi) then risss=risss+12
						shisss=clng(risss)-clng(shi)+1
						if shisss>12 then shisss=shisss mod 12
						if shisss=0 then shisss=12
						'Response.Write shisss
						ShiYX=tianxing(shisss)
					end if

%>
		<tr><td colspan=4><hr size=1></td></tr>
		<tr>
			<td width="25%" align=center style="height: 14px"><font color=red><%=nianyx%></font></td>
			<td width="25%" align=center style="height: 14px"><font color=red><%=yueyx%></font></td>
			<td width="25%" align=center style="height: 14px"><font color=red><%=riyx%></font></td>
			<td width="25%" align=center style="height: 14px"><font color=red><%=shiyx%></font></td>
		</tr>	
<%
' 桃花煞
if instr("申子辰",dizi(nian))<>0  then 
	if dizi(yue)="酉" then YueTaoHua=YueTaoHua&"(年)桃花煞<br>"
	if instr(ridz,"酉")<>0 then RITaoHua=RiTaoHua&"(年)桃花煞<br>"
	if dizi(SHI)="酉" then ShiTaoHua=ShiTaoHua&"(年)桃花煞<br>"
end if	
if  instr("申子辰",dizi(dmdz))<>0 then 
	if dizi(yue)="酉" then YueTaoHua=YueTaoHua&"(大命)桃花煞<br>"
	if instr(ridz,"酉")<>0 then RITaoHua=RiTaoHua&"(大命)桃花煞<br>"
	if dizi(SHI)="酉" then ShiTaoHua=ShiTaoHua&"(大命)桃花煞<br>"
end if
if instr("亥卯未",dizi(nian))<>0 then 
	if dizi(yue)="子" then YueTaoHua=YueTaoHua&"(年)桃花煞<br>"
	if instr(ridz,"子")<>0 then RITaoHua=RiTaoHua&"(年)桃花煞<br>"
	if dizi(SHI)="子" then ShiTaoHua=ShiTaoHua&"(年)桃花煞<br>"
end if	
if instr("亥卯未",dizi(dmdz))<>0 then 
	if dizi(yue)="子" then YueTaoHua=YueTaoHua&"(大命)桃花煞<br>"
	if instr(ridz,"子")<>0 then RITaoHua=RiTaoHua&"(大命)桃花煞<br>"
	if dizi(SHI)="子" then ShiTaoHua=ShiTaoHua&"(大命)桃花煞<br>"
end if	
if instr("寅午戌",dizi(nian))<>0 then 
	if dizi(yue)="卯" then YueTaoHua=YueTaoHua&"(年)桃花煞<br>"
	if instr(ridz,"卯")<>0 then RITaoHua=RiTaoHua&"(年)桃花煞<br>"
	if dizi(SHI)="卯" then ShiTaoHua=ShiTaoHua&"(年)桃花煞<br>"
end if
if instr("寅午戌",dizi(dmdz))<>0 then 
	if dizi(yue)="卯" then YueTaoHua=YueTaoHua&"(大命)桃花煞<br>"
	if instr(ridz,"卯")<>0 then RITaoHua=RiTaoHua&"(大命)桃花煞<br>"
	if dizi(SHI)="卯" then ShiTaoHua=ShiTaoHua&"(大命)桃花煞<br>"
end if
if instr("巳酉丑",dizi(nian))<>0 then 
	if dizi(yue)="午" then YueTaoHua=YueTaoHua&"(年)桃花煞<br>"
	if instr(ridz,"午")<>0 then RITaoHua=RiTaoHua&"(年)桃花煞<br>"
	if dizi(SHI)="午" then ShiTaoHua=ShiTaoHua&"(年)桃花煞<br>"
end if
if instr("巳酉丑",dizi(dmdz))<>0 then 
	if dizi(yue)="午" then YueTaoHua=YueTaoHua&"(大命)桃花煞<br>"
	if instr(ridz,"午")<>0 then RITaoHua=RiTaoHua&"(大命)桃花煞<br>"
	if dizi(SHI)="午" then ShiTaoHua=ShiTaoHua&"(大命)桃花煞<br>"
end if

'将星

		if dizi(nian)="子" or dizi(nian)="卯" or dizi(nian)="午" or dizi(nian)="酉" then
			NianJiangXing="<a title='多指有组织能力或办事能力，这也是推算有没有能力，有没有官运的一个断法。将星多严肃、不怒自威，多是在自己的领域内有领导才能、组织能力、有实权或有威望、有德信之人。'>年将星</a><br>"
		end if
		
		if dizi(nian)="辰" OR dizi(nian)="申" then
			if dizi(yue)="子" then 
				YueJiangXing="<a title='多指有组织能力或办事能力，这也是推算有没有能力，有没有官运的一个断法。将星多严肃、不怒自威，多是在自己的领域内有领导才能、组织能力、有实权或有威望、有德信之人。'>月将星</a><br>"
			end if
			if instr(ridz,"子")<>0 then
				RiJiangXing="<a title='多指有组织能力或办事能力，这也是推算有没有能力，有没有官运的一个断法。将星多严肃、不怒自威，多是在自己的领域内有领导才能、组织能力、有实权或有威望、有德信之人。'>日将星</a><br>"
			end if
			if dizi(SHI)="子" then
				SHIJiangXing="<a title='多指有组织能力或办事能力，这也是推算有没有能力，有没有官运的一个断法。将星多严肃、不怒自威，多是在自己的领域内有领导才能、组织能力、有实权或有威望、有德信之人。'>时将星</a><br>"
			end if
		end if
		if dizi(nian)="丑" OR dizi(nian)="巳" then
			if dizi(yue)="酉" then 
				YueJiangXing="<a title='多指有组织能力或办事能力，这也是推算有没有能力，有没有官运的一个断法。将星多严肃、不怒自威，多是在自己的领域内有领导才能、组织能力、有实权或有威望、有德信之人。'>月将星</a><br>"
			end if
			if instr(ridz,"酉")<>0 then
				RiJiangXing="<a title='多指有组织能力或办事能力，这也是推算有没有能力，有没有官运的一个断法。将星多严肃、不怒自威，多是在自己的领域内有领导才能、组织能力、有实权或有威望、有德信之人。'>日将星</a><br>"
			end if
			if dizi(SHI)="酉" then
				SHIJiangXing="<a title='多指有组织能力或办事能力，这也是推算有没有能力，有没有官运的一个断法。将星多严肃、不怒自威，多是在自己的领域内有领导才能、组织能力、有实权或有威望、有德信之人。'>时将星</a><br>"
			end if
		end if	
		if dizi(nian)="寅" OR dizi(nian)="戌" then
			if dizi(yue)="午" then 
				YueJiangXing="<a title='多指有组织能力或办事能力，这也是推算有没有能力，有没有官运的一个断法。将星多严肃、不怒自威，多是在自己的领域内有领导才能、组织能力、有实权或有威望、有德信之人。'>月将星</a><br>"
			end if
			if instr(ridz,"午")<>0 then
				RiJiangXing="<a title='多指有组织能力或办事能力，这也是推算有没有能力，有没有官运的一个断法。将星多严肃、不怒自威，多是在自己的领域内有领导才能、组织能力、有实权或有威望、有德信之人。'>日将星</a><br>"
			end if
			if dizi(SHI)="午" then
				SHIJiangXing="<a title='多指有组织能力或办事能力，这也是推算有没有能力，有没有官运的一个断法。将星多严肃、不怒自威，多是在自己的领域内有领导才能、组织能力、有实权或有威望、有德信之人。'>时将星</a><br>"
			end if
		end if	
		if dizi(nian)="未" OR dizi(nian)="亥" then
			if dizi(yue)="卯" then 
				YueJiangXing="<a title='多指有组织能力或办事能力，这也是推算有没有能力，有没有官运的一个断法。'>月将星</a><br>"
			end if
			if instr(ridz,"卯")<>0 then
				RiJiangXing="<a title='多指有组织能力或办事能力，这也是推算有没有能力，有没有官运的一个断法。'>日将星</a><br>"
			end if
			if dizi(SHI)="卯" then
				SHIJiangXing="<a title='多指有组织能力或办事能力，这也是推算有没有能力，有没有官运的一个断法。'>时将星</a><br>"
			end if
		end if	


'华盖

		if dizi(nian)="申" OR dizi(nian)="子" then
			if dizi(yue)="辰" then 
				YueHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>月上华盖</a><br> "
			end if
			if instr(ridz,"辰")<>0 then
				RiHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>日上华盖</a><br> "
			end if
			if dizi(shi)="辰" then
				ShiHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>时上华盖</a><br> "
			end if
			
			if dizi(DMDZ)="辰" then
				DMHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>大命华盖</a> <br>"
			end if
		end if
		if dizi(nian)="酉" OR dizi(nian)="巳" then
			if dizi(yue)="丑" then 
				YueHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>月上华盖</a> <br>"
			end if
			if instr(ridz,"丑")<>0 then
				RiHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>日上华盖</a> <br>"
			end if
			if dizi(shi)="丑" then
				ShiHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>时上华盖</a><br> "
			end if
			if dizi(DMDZ)="丑" then
				DMHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>大命华盖</a><br> "
			end if
		end if	
		if dizi(nian)="寅" OR dizi(nian)="午" then
			if dizi(yue)="戌" then 
				YueHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>月上华盖</a><br> "
			end if
			if instr(ridz,"戌")<>0 then
				RiHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>日上华盖</a><br> "
			end if
			if dizi(shi)="戌" then
				ShiHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>时上华盖</a><br> "
			end if
			if dizi(DMDZ)="戌" then
				DMHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>大命华盖</a><br> "
			end if
		end if	
		if dizi(nian)="卯" OR dizi(nian)="亥" then
			if dizi(yue)="未" then 
				YueHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>月上华盖</a><br> "
			end if
			if instr(ridz,"未")<>0 then
				RiHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>日上华盖</a><br> "
			end if
			if dizi(shi)="未" then
				ShiHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>时上华盖</a><br> "
			end if
			if dizi(DMDZ)="未" then
				DMHuaGai="<a title='有名气，智慧高超，富有才华，奇人异士，术业专精，多才多艺、气度不凡，但不免孤独。'>大命华盖</a><br> "
			end if
		end if	


'将马

		if dizi(Nian)="申" OR dizi(Nian)="子" OR dizi(Nian)="辰" then
			if dizi(Yue)="寅" then 
				YueJiangMa="<a title='平和的贵运和能力。'>月上将马</a><br> "
			end if
			if instr(ridz,"寅")<>0 then
				RiJiangMa="<a title='平和的贵运和能力。'>日上将马</a><br> "
			end if
			if dizi(SHI)="寅" then
				SHIJiangMa="<a title='平和的贵运和能力。'>时上将马</a><br> "
			end if
		end if
		if dizi(Nian)="酉" OR dizi(Nian)="巳" or dizi(Nian)="丑" then
			if dizi(Yue)="亥" then 
				YueJiangMa="<a title='平和的贵运和能力。'>月上将马</a><br> "
			end if
			if instr(ridz,"亥")<>0 then
				RiJiangMa="<a title='平和的贵运和能力。'>日上将马</a><br> "
			end if
			if dizi(SHI)="亥" then
				SHIJiangMa="<a title='平和的贵运和能力。'>时上将马</a><br> "
			end if
		end if	
		if dizi(Nian)="寅" OR dizi(Nian)="午" or dizi(Nian)="戌" then
			if dizi(Yue)="申" then 
				YueJiangMa="<a title='平和的贵运和能力。'>月上将马</a><br> "
			end if
			if instr(ridz,"申")<>0 then
				RiJiangMa="<a title='平和的贵运和能力。'>日上将马</a><br> "
			end if
			if dizi(SHI)="申" then
				SHIJiangMa="<a title='平和的贵运和能力。'>时上将马</a><br> "
			end if
		end if	
		if dizi(Nian)="卯" OR dizi(Nian)="亥" or dizi(Nian)="未" then
			if dizi(Yue)="巳" then 
				YueJiangMa="<a title='平和的贵运和能力。'>月上将马</a><br> "
			end if
			if instr(ridz,"巳")<>0 then
				RiJiangMa="<a title='平和的贵运和能力。'>日上将马</a><br> "
			end if
			if dizi(SHI)="巳" then
				SHIJiangMa="<a title='平和的贵运和能力。'>时上将马</a><br> "
			end if
		end if	
		
'驿马

		if dizi(SHI)="申" OR dizi(SHI)="子" OR dizi(SHI)="辰" then
			if dizi(YUE)="寅" then 
				YUEYIMA="<a title='辛苦劳碌一生'>月上驿马</a><BR>"
			end if
			if instr(ridz,"寅")<>0 then
				RIYIMA="<a title='辛苦劳碌'>日上驿马</a><BR>"
			end if
			if dizi(NIAN)="寅" then
				NIANYIMA="<a title='辛苦劳碌'>年上驿马</a><BR>"
			end if
		end if
		if dizi(SHI)="酉" OR dizi(SHI)="巳" or dizi(SHI)="丑" then
			if dizi(YUE)="亥" then 
				YUEYIMA="<a title='辛苦劳碌一生'>月上驿马</a><BR>"
			end if
			if instr(ridz,"亥")<>0 then
				RIYIMA="<a title='辛苦劳碌'>日上驿马</a><BR>"
			end if
			if dizi(NIAN)="亥" then
				NIANYIMA="<a title='辛苦劳碌'>年上驿马</a><BR>"
			end if
		end if	
		if dizi(SHI)="寅" OR dizi(SHI)="午" or dizi(SHI)="戌" then
			if dizi(YUE)="申" then 
				YUEYIMA="<a title='辛苦劳碌一生'>月上驿马</a><BR>"
			end if
			if instr(ridz,"申")<>0 then
				RIYIMA="<a title='辛苦劳碌'>日上驿马</a><BR>"
			end if
			if dizi(NIAN)="申" then
				NIANYIMA="<a title='辛苦劳碌'>年上驿马</a><BR>"
			end if
		end if	
		if dizi(SHI)="卯" OR dizi(SHI)="亥" or dizi(SHI)="未" then
			if dizi(YUE)="巳" then 
				YUEYIMA="<a title='辛苦劳碌一生'>月上驿马</a><BR>"
			end if
			if instr(ridz,"巳")<>0 then
				RIYIMA="<a title='辛苦劳碌'>日上驿马</a><BR>"
			end if
			if dizi(NIAN)="巳" then
				NIANYIMA="<a title='辛苦劳碌'>年上驿马</a><BR>"
			end if
		end if	
		
'三煞

	if dizi(nian)="子" or dizi(nian)="辰" or dizi(nian)="申" then
		if dizi(yue)="巳" then
			YueSanSa="<a title='财运受阻或破耗'>月上劫煞(巳)</a><BR>"
		end if
		if instr(ridz,"巳")<>0 then
			RISanSa="<a title='财运受阻或破耗'>日上劫煞(巳)</a><BR>"
		end if
		if dizi(shi)="巳" then
			SHISanSa="<a title='财运受阻或破耗'>时上劫煞(巳)</a><BR>"
		end if
		if dizi(yue)="午" then
			YueSanSa="月上病煞(午)<BR>"
		end if
		if instr(ridz,"午")<>0 then
			RISanSa="日上病煞(午)<BR>"
		end if
		if dizi(shi)="午" then
			SHISanSa="时上病煞(午)<BR>"
		end if
		if dizi(yue)="未" then
			YueSanSa="<a title='伤灾、惊吓'>月上灾煞(未)</a><BR>"
		end if
		if instr(ridz,"未")<>0 then
			RISanSa="<a title='伤灾、惊吓'>日上灾煞(未)</a><BR>"
		end if
		if dizi(shi)="未" then
			SHISanSa="<a title='伤灾、惊吓'>时上灾煞(未)</a><BR>"
		end if
	end if
	
	if dizi(nian)="丑" or dizi(nian)="巳" or dizi(nian)="酉" then
		if dizi(yue)="寅" then
			YueSanSa="<a title='财运受阻或破耗'>月上劫煞(寅)</a><BR>"
		end if
		if instr(ridz,"寅")<>0 then
			RISanSa="<a title='财运受阻或破耗'>日上劫煞(寅)</a><BR>"
		end if
		if dizi(shi)="寅" then
			SHISanSa="<a title='财运受阻或破耗'>时上劫煞(寅)</a><BR>"
		end if
		if dizi(yue)="卯" then
			YueSanSa="月上病煞(卯)<BR>"
		end if
		if instr(ridz,"卯")<>0 then
			RISanSa="日上病煞(卯)<BR>"
		end if
		if dizi(shi)="卯" then
			SHISanSa="时上病煞(卯)</a><BR>"
		end if
		if dizi(yue)="辰" then
			YueSanSa="<a title='伤灾、惊吓'>月上灾煞(辰)<BR>"
		end if
		if instr(ridz,"辰")<>0 then
			RISanSa="<a title='伤灾、惊吓'>日上灾煞(辰)</a><BR>"
		end if
		if dizi(shi)="辰" then
			SHISanSa="<a title='伤灾、惊吓'>时上灾煞(辰)</a><BR>"
		end if
	end if
	
	if dizi(nian)="寅" or dizi(nian)="午" or dizi(nian)="戌" then
		if dizi(yue)="亥" then
			YueSanSa="<a title='财运受阻或破耗'>月上劫煞(亥)</a><BR>"
		end if
		if instr(ridz,"亥")<>0 then
			RISanSa="<a title='财运受阻或破耗'>日上劫煞(亥)</a><BR>"
		end if
		if dizi(shi)="亥" then
			SHISanSa="<a title='财运受阻或破耗'>时上劫煞(亥)</a><BR>"
		end if
		if dizi(yue)="子" then
			YueSanSa="月上病煞(子)<BR>"
		end if
		if instr(ridz,"子")<>0 then
			RISanSa="日上病煞(子)<BR>"
		end if
		if dizi(shi)="子" then
			SHISanSa="时上病煞(子)<BR>"
		end if
		if dizi(yue)="丑" then
			YueSanSa="<a title='伤灾、惊吓'>月上灾煞(丑)</a><BR>"
		end if
		if instr(ridz,"丑")<>0 then
			RISanSa="<a title='伤灾、惊吓'>日上灾煞(丑)</a><BR>"
		end if
		if dizi(shi)="丑" then
			SHISanSa="<a title='伤灾、惊吓'>时上灾煞(丑)</a><BR>"
		end if
	end if
	if dizi(nian)="亥" or dizi(nian)="卯" or dizi(nian)="未" then
		if dizi(yue)="申" then
			YueSanSa="<a title='财运受阻或破耗'>月上劫煞(申)</a><BR>"
		end if
		if instr(ridz,"申")<>0 then
			RISanSa="<a title='财运受阻或破耗'>日上劫煞(申)</a><BR>"
		end if
		if dizi(shi)="申" then
			SHISanSa="<a title='财运受阻或破耗'>时上劫煞(申)</a><BR>"
		end if
		if dizi(yue)="酉" then
			YueSanSa="月上病煞(酉)<BR>"
		end if
		if instr(ridz,"酉")<>0 then
			RISanSa="日上病煞(酉)<BR>"
		end if
		if dizi(shi)="酉" then
			SHISanSa="时上病煞(酉)<BR>"
		end if
		if dizi(yue)="戌" then
			YueSanSa="<a title='伤灾、惊吓'>月上灾煞(戌)</a><BR>"
		end if
		if instr(ridz,"戌")<>0 then
			RISanSa="<a title='伤灾、惊吓'>日上灾煞(戌)</a><BR>"
		end if
		if dizi(shi)="戌" then
			SHISanSa="<a title='伤灾、惊吓'>时上灾煞(戌)</a><BR>"
		end if
	end if		
	
'孤寡煞
	if dizi(nian)="亥" or dizi(nian)="子" or dizi(nian)="丑" then
		if instr(dizi(yue),"寅")<>0 and xb="男" then
			YueGuGuaSa=YueGuGuaSa&"月上孤辰<BR>"
		end if
		if instr(dizi(yue),"戌")<>0 and xb="女" then
			YueGuGuaSa="月上寡宿<BR>"
		end if	
		if instr(RIDZ,"寅")<>0 and xb="男" then
			RIGuGuaSa="日上孤辰<BR>"
		end if
		if instr(RIDZ,"戌")<>0 and xb="女" then
			RIGuGuaSa="日上寡宿<BR>"
		end if		
		if instr(dizi(SHI),"寅")<>0 and xb="男" then
			SHIGuGuaSa="时上孤辰<BR>"
		end if
		if instr(dizi(SHI),"戌")<>0 and xb="女" then
			SHIGuGuaSa="时上寡宿<BR>"
		end if	
	end if
	if dizi(nian)="寅" or dizi(nian)="卯" or dizi(nian)="辰" then
		if dizi(yue)="巳" and xb="男" then
			YueGuGuaSa=YueGuGuaSa&"月上孤辰<BR>"
		end if
		if instr(dizi(yue),"丑")<>0 and xb="女" then
			YueGuGuaSa="月上寡宿<BR>"
		end if	
		if instr(RIDZ,"巳")<>0 and xb="男" then
			RIGuGuaSa="日上孤辰<BR>"
		end if
		if instr(RIDZ,"丑")<>0 and xb="女" then
			RIGuGuaSa="日上寡宿<BR>"
		end if	
		if instr(dizi(SHI),"巳")<>0 and xb="男" then
			SHIGuGuaSa="时上孤辰<BR>"
		end if
		if instr(dizi(SHI),"丑")<>0 and xb="女" then
			SHIGuGuaSa="时上寡宿<BR>"
		end if				
	end if
	
	if dizi(nian)="巳" or dizi(nian)="午" or dizi(nian)="未" then
		if instr(dizi(yue),"申")<>0 and xb="男" then
			YueGuGuaSa=YueGuGuaSa&"月上孤辰<BR>"
		end if
		if instr(dizi(yue),"辰")<>0 and xb="女" then
			YueGuGuaSa="月上寡宿<BR>"
		end if	
		if instr(RIDZ,"申")<>0 and xb="男" then
			RIGuGuaSa="日上孤辰<BR>"
		end if
		if instr(RIDZ,"辰")<>0 and xb="女" then
			RIGuGuaSa="日上寡宿<BR>"
		end if	
		if instr(dizi(SHI),"申")<>0 and xb="男" then
			SHIGuGuaSa="时上孤辰<BR>"
		end if
		if instr(dizi(SHI),"辰")<>0 and xb="女" then
			SHIGuGuaSa="时上寡宿<BR>"
		end if				
	end if
	
	if dizi(nian)="申" or dizi(nian)="酉" or dizi(nian)="戌" then
		if instr(dizi(yue),"亥")<>0 and xb="男" then
			YueGuGuaSa=YueGuGuaSa&"月上孤辰<BR>"
		end if
		if instr(dizi(yue),"未")<>0 and xb="女" then
			YueGuGuaSa="月上寡宿<BR>"
		end if	
		if instr(RIDZ,"亥")<>0 and xb="男" then
			RIGuGuaSa="日上孤辰<BR>"
		end if
		if instr(RIDZ,"未")<>0 and xb="女" then
			RIGuGuaSa="日上寡宿<BR>"
		end if	
		if instr(dizi(SHI),"亥")<>0 and xb="男" then
			SHIGuGuaSa="时上孤辰<BR>"
		end if
		if instr(dizi(SHI),"未")<>0 and xb="女" then
			SHIGuGuaSa="时上寡宿<BR>"
		end if				
	end if	
	
'天罗地网

if ( dizi(nian)="戌" and dizi(yue)="亥" and xb="男" ) or ( dizi(yue)="戌" and dizi(nian)="亥" and xb="男" ) then
	YueTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>年月天罗</a><br>"
end if
if ( dizi(nian)="戌" and instr(ridz,"亥")<>0 and xb="男" ) or ( dizi(nian)="亥" and instr(ridz,"戌")<>0 and xb="男" ) then
	RiTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>年日天罗</a><br>"
end if
if ( dizi(nian)="戌" and instr(dizi(shi),"亥")<>0 and xb="男" ) or ( dizi(nian)="亥" and instr(dizi(shi),"戌")<>0 and xb="男" )  then
	ShiTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>年时天罗</a><br>"
end if
if ( dizi(yue)="戌" and instr(dizi(ri),"亥")<>0 and xb="男" ) or ( dizi(yue)="亥" and instr(dizi(ri),"戌")<>0 and xb="男" ) then
	RITianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>月日天罗</a><br>"
end if
if ( dizi(shi)="戌" and instr(dizi(ri),"亥")<>0 and xb="男" ) or ( dizi(shi)="亥" and instr(dizi(ri),"戌")<>0 and xb="男" ) then
	ShiTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>日时天罗</a><br>"
end if

if ( dizi(nian)="戌" and dizi(yue)="亥" and xb="女" and dizi(DMDZ)="亥" ) or ( dizi(yue)="戌" and dizi(nian)="亥" and xb="女"  and dizi(DMDZ)="亥" ) then
	YueTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>年月天罗</a><br>"
end if
if ( dizi(nian)="戌" and instr(ridz,"亥")<>0 and xb="女" and dizi(DMDZ)="亥"  ) or ( dizi(nian)="亥" and instr(ridz,"戌")<>0 and xb="女"  and dizi(DMDZ)="亥" ) then
	RiTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>年日天罗</a><br>"
end if
if ( dizi(nian)="戌" and instr(dizi(shi),"亥")<>0 and xb="女" and dizi(DMDZ)="亥"  ) or ( dizi(nian)="亥" and instr(dizi(shi),"戌")<>0 and xb="女" and dizi(DMDZ)="亥"  )  then
	ShiTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>年时天罗</a><br>"
end if
if ( dizi(yue)="戌" and instr(dizi(ri),"亥")<>0 and xb="女" and dizi(DMDZ)="亥"  ) or ( dizi(yue)="亥" and instr(dizi(ri),"戌")<>0 and xb="女" and dizi(DMDZ)="亥"  ) then
	RITianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>月日天罗</a><br>"
end if
if ( dizi(shi)="戌" and instr(dizi(ri),"亥")<>0 and xb="女" and dizi(DMDZ)="亥"  ) or ( dizi(shi)="亥" and instr(dizi(ri),"戌")<>0 and xb="女"  and dizi(DMDZ)="亥" ) then
	ShiTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>时日天罗</a><br>"
end if

if ( dizi(nian)="辰" and dizi(yue)="巳"  and xb="女") or ( dizi(yue)="辰" and dizi(nian)="巳"  and xb="女") then
	YueTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>年月地网</a><br>"
end if
if ( dizi(nian)="辰" and instr(ridz,"巳")<>0  and xb="女") or ( dizi(nian)="巳" and instr(ridz,"辰")<>0 ) and xb="女" then
	RiTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>年日地网</a><br>"
end if
if ( dizi(nian)="辰" and instr(dizi(shi),"巳")<>0  and xb="女") or ( dizi(nian)="巳" and instr(dizi(shi),"辰")<>0  and xb="女") then
	ShiTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>年时地网</a><br>"
end if
if ( dizi(yue)="辰" and instr(dizi(ri),"巳")<>0 and xb="女" ) or ( dizi(yue)="巳" and instr(dizi(ri),"辰")<>0  and xb="女")  then
	RITianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>月日地网</a><br>"
end if
if ( dizi(shi)="辰" and instr(dizi(ri),"巳")<>0  and xb="女") or ( dizi(shi)="巳" and instr(dizi(ri),"辰")<>0  and xb="女") then
	ShiTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>日时地网</a><br>"
end if

if ( dizi(nian)="辰" and dizi(yue)="巳"  and xb="男" and dizi(DMDZ)="寅") or ( dizi(yue)="辰" and dizi(nian)="巳"  and xb="男" and dizi(DMDZ)="寅") then
	YueTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>年月地网</a><br>"
end if
if ( dizi(nian)="辰" and instr(ridz,"巳")<>0  and xb="男" and dizi(DMDZ)="寅") or ( dizi(nian)="巳" and instr(ridz,"辰")<>0 and xb="男"   and dizi(DMDZ)="寅") then
	RiTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>年日地网</a><br>"
end if
if ( dizi(nian)="辰" and instr(dizi(shi),"巳")<>0  and xb="男" and dizi(DMDZ)="寅") or ( dizi(nian)="巳" and instr(dizi(shi),"辰")<>0  and xb="男"  and dizi(DMDZ)="寅") then
	ShiTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>年时地网</a><br>"
end if
if ( dizi(yue)="辰" and instr(dizi(ri),"巳")<>0 and xb="男"  and dizi(DMDZ)="寅") or ( dizi(yue)="巳" and instr(dizi(ri),"辰")<>0  and xb="男"  and dizi(DMDZ)="寅")  then
	RITianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>月日地网</a><br>"
end if
if ( dizi(shi)="辰" and instr(dizi(ri),"巳")<>0  and xb="男" and dizi(DMDZ)="寅") or ( dizi(shi)="巳" and instr(dizi(ri),"辰")<>0  and xb="男"  and dizi(DMDZ)="寅") then
	ShiTianLuoDiWang="<a title='有明显的官司、纠纷和牢狱'>日时地网</a><br>"
end if


'红鸾天喜

if dizi(dmdz)="子" then
	if dizi(nian)="卯" then
		NianHongLuan="大命红鸾<br>"
		if dizi(yue)="酉" then YueTianXi="大命天喜<br>"
		if instr(ridz,"酉")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="酉" then SHITianXi="大命天喜<br>"
	end if
	if dizi(yue)="卯" then 
		YueHongLuan="大命红鸾<br>"
		if dizi(Nian)="酉" then NianTianXi="大命天喜<br>"
		if instr(ridz,"酉")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="酉" then SHITianXi="大命天喜<br>"		
	end if
	if instr(ridz,"卯")<>0 then 
		riHongLuan="大命红鸾<br>"
		if dizi(Nian)="酉" then NianTianXi="大命天喜<br>"
		if instr(dizi(YUE),"酉")<>0 then YUETianXi="大命天喜<br>"
		if dizi(SHI)="酉" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(shi)="卯" then 
		ShiHongLuan="大命红鸾<br>"
		if dizi(Nian)="酉" then NianTianXi="大命天喜<br>"
		if instr(ridz,"酉")<>0 then RiTianXi="大命天喜<br>"
		if dizi(yue)="酉" then YUETianXi="大命天喜<br>"			
	end if
end if

if dizi(dmdz)="卯" then
	if dizi(nian)="子" then
		NianHongLuan="大命红鸾<br>"
		if dizi(yue)="午" then YueTianXi="大命天喜<br>"
		if instr(ridz,"午")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="午" then SHITianXi="大命天喜<br>"
	end if
	if dizi(yue)="子" then 
		YueHongLuan="大命红鸾<br>"
		if dizi(Nian)="午" then NianTianXi="大命天喜<br>"
		if instr(ridz,"午")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="午" then SHITianXi="大命天喜<br>"		
	end if
	if instr(ridz,"子")<>0 then 
		riHongLuan="大命红鸾<br>"
		if dizi(Nian)="午" then NianTianXi="大命天喜<br>"
		if instr(dizi(YUE),"午")<>0 then YUETianXi="大命天喜<br>"
		if dizi(SHI)="午" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(shi)="子" then 
		ShiHongLuan="大命红鸾<br>"
		if dizi(Nian)="午" then NianTianXi="大命天喜<br>"
		if instr(ridz,"午")<>0 then RiTianXi="大命天喜<br>"
		if dizi(yue)="午" then YUETianXi="大命天喜<br>"			
	end if
end if


if dizi(dmdz)="寅" then
	if dizi(nian)="丑" then 
		NianHongLuan="大命红鸾<br>"
		if dizi(YUE)="未" then YueTianXi="大命天喜<br>"
		if instr(ridz,"未")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="未" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(yue)="丑" then 
		YueHongLuan="大命红鸾<br>"
		if dizi(nian)="未" then nianTianXi="大命天喜<br>"
		if instr(ridz,"未")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="未" then SHITianXi="大命天喜<br>"			
	end if
	if instr(ridz,"丑")<>0 then 
		riHongLuan="大命红鸾<br>"
		if dizi(YUE)="未" then YueTianXi="大命天喜<br>"
		if instr(dizi(nian),"未")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="未" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(shi)="丑" then 
		ShiHongLuan="大命红鸾<br>"
		if dizi(YUE)="未" then YueTianXi="大命天喜<br>"
		if instr(ridz,"未")<>0 then RiTianXi="大命天喜<br>"
		if dizi(nian)="未" then SHITianXi="大命天喜<br>"			
	end if
end if
if dizi(dmdz)="丑" then
	if dizi(nian)="寅" then 
		NianHongLuan="大命红鸾<br>"
		if dizi(YUE)="申" then YueTianXi="大命天喜<br>"
		if instr(ridz,"申")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="申" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(yue)="寅" then 
		YueHongLuan="大命红鸾<br>"
		if dizi(nian)="申" then nianTianXi="大命天喜<br>"
		if instr(ridz,"申")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="申" then SHITianXi="大命天喜<br>"			
	end if
	if instr(ridz,"寅")<>0 then 
		riHongLuan="大命红鸾<br>"
		if dizi(YUE)="申" then YueTianXi="大命天喜<br>"
		if instr(dizi(nian),"申")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="申" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(shi)="寅" then 
		ShiHongLuan="大命红鸾<br>"
		if dizi(YUE)="申" then YueTianXi="大命天喜<br>"
		if instr(ridz,"申")<>0 then RiTianXi="大命天喜<br>"
		if dizi(nian)="申" then SHITianXi="大命天喜<br>"			
	end if
end if

if dizi(dmdz)="亥" then
	if dizi(nian)="辰" then 
		NianHongLuan="大命红鸾<br>"
		if dizi(YUE)="戌" then YueTianXi="大命天喜<br>"
		if instr(ridz,"戌")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="戌" then SHITianXi="大命天喜<br>"	
	end if
	if dizi(yue)="辰" then 
		YueHongLuan="大命红鸾<br>"
		if dizi(nian)="戌" then nianTianXi="大命天喜<br>"
		if instr(ridz,"戌")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="戌" then SHITianXi="大命天喜<br>"			
	end if
	if instr(ridz,"辰")<>0 then 
		riHongLuan="大命红鸾<br>"
		if dizi(YUE)="戌" then YueTianXi="大命天喜<br>"
		if instr(dizi(nian),"戌")<>0 then nianTianXi="大命天喜<br>"
		if dizi(SHI)="戌" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(shi)="辰" then 
		ShiHongLuan="大命红鸾<br>"
		if dizi(YUE)="戌" then YueTianXi="大命天喜<br>"
		if instr(ridz,"戌")<>0 then RiTianXi="大命天喜<br>"
		if dizi(nian)="戌" then nianTianXi="大命天喜<br>"			
	end if
end if
if dizi(dmdz)="辰" then
	if dizi(nian)="亥" then 
		NianHongLuan="大命红鸾<br>"
		if dizi(YUE)="巳" then YueTianXi="大命天喜<br>"
		if instr(ridz,"巳")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="巳" then SHITianXi="大命天喜<br>"	
	end if
	if dizi(yue)="亥" then 
		YueHongLuan="大命红鸾<br>"
		if dizi(nian)="巳" then nianTianXi="大命天喜<br>"
		if instr(ridz,"巳")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="巳" then SHITianXi="大命天喜<br>"			
	end if
	if instr(ridz,"亥")<>0 then 
		riHongLuan="大命红鸾<br>"
		if dizi(YUE)="巳" then YueTianXi="大命天喜<br>"
		if instr(dizi(nian),"巳")<>0 then nianTianXi="大命天喜<br>"
		if dizi(SHI)="巳" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(shi)="亥" then 
		ShiHongLuan="大命红鸾<br>"
		if dizi(YUE)="巳" then YueTianXi="大命天喜<br>"
		if instr(ridz,"巳")<>0 then RiTianXi="大命天喜<br>"
		if dizi(nian)="巳" then nianTianXi="大命天喜<br>"			
	end if
end if

if dizi(dmdz)="戌" then
	if dizi(nian)="巳" then 
		NianHongLuan="大命红鸾<br>"
		if dizi(YUE)="亥" then YueTianXi="大命天喜<br>"
		if instr(ridz,"亥")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="亥" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(yue)="巳" then 
		YueHongLuan="大命红鸾<br>"
		if dizi(NIan)="亥" then NIANTianXi="大命天喜<br>"
		if instr(ridz,"亥")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="亥" then SHITianXi="大命天喜<br>"			
	end if
	if instr(ridz,"巳")<>0 then 
		riHongLuan="大命红鸾<br>"
		if dizi(YUE)="亥" then YueTianXi="大命天喜<br>"
		if instr(dizi(nian),"亥")<>0 then nianTianXi="大命天喜<br>"
		if dizi(SHI)="亥" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(shi)="巳" then 
		ShiHongLuan="大命红鸾<br>"
		if dizi(YUE)="亥" then YueTianXi="大命天喜<br>"
		if instr(ridz,"亥")<>0 then RiTianXi="大命天喜<br>"
		if dizi(nian)="亥" then NIANTianXi="大命天喜<br>"			
	end if
end if
if dizi(dmdz)="巳" then
	if dizi(nian)="戌" then 
		NianHongLuan="大命红鸾<br>"
		if dizi(YUE)="辰" then YueTianXi="大命天喜<br>"
		if instr(ridz,"辰")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="辰" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(yue)="戌" then 
		YueHongLuan="大命红鸾<br>"
		if dizi(NIan)="辰" then NIANTianXi="大命天喜<br>"
		if instr(ridz,"辰")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="辰" then SHITianXi="大命天喜<br>"			
	end if
	if instr(ridz,"戌")<>0 then 
		riHongLuan="大命红鸾<br>"
		if dizi(YUE)="辰" then YueTianXi="大命天喜<br>"
		if instr(dizi(nian),"辰")<>0 then nianTianXi="大命天喜<br>"
		if dizi(SHI)="辰" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(shi)="戌" then 
		ShiHongLuan="大命红鸾<br>"
		if dizi(YUE)="辰" then YueTianXi="大命天喜<br>"
		if instr(ridz,"辰")<>0 then RiTianXi="大命天喜<br>"
		if dizi(nian)="辰" then NIANTianXi="大命天喜<br>"			
	end if
end if


if dizi(dmdz)="午" then
	if dizi(nian)="酉" then 
		NianHongLuan="大命红鸾<br>"
		if dizi(YUE)="卯" then YueTianXi="大命天喜<br>"
		if instr(ridz,"卯")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="卯" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(yue)="酉" then 
		YueHongLuan="大命红鸾<br>"
		if dizi(nian)="卯" then NianTianXi="大命天喜<br>"
		if instr(ridz,"卯")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="卯" then SHITianXi="大命天喜<br>"				
	end if
	if instr(ridz,"酉")<>0 then 
		riHongLuan="大命红鸾<br>"
		if dizi(YUE)="卯" then YueTianXi="大命天喜<br>"
		if instr(dizi(nian),"卯")<>0 then NianTianXi="大命天喜<br>"
		if dizi(SHI)="卯" then SHITianXi="大命天喜<br>"		
	end if
	if dizi(shi)="酉" then 
		ShiHongLuan="大命红鸾<br>"
		if dizi(YUE)="卯" then YueTianXi="大命天喜<br>"
		if instr(ridz,"卯")<>0 then RiTianXi="大命天喜<br>"
		if dizi(nian)="卯" then nianTianXi="大命天喜<br>"		
	end if
end if
if dizi(dmdz)="酉" then
	if dizi(nian)="午" then 
		NianHongLuan="大命红鸾<br>"
		if dizi(YUE)="子" then YueTianXi="大命天喜<br>"
		if instr(ridz,"子")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="子" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(yue)="午" then 
		YueHongLuan="大命红鸾<br>"
		if dizi(nian)="子" then NianTianXi="大命天喜<br>"
		if instr(ridz,"子")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="子" then SHITianXi="大命天喜<br>"				
	end if
	if instr(ridz,"午")<>0 then 
		riHongLuan="大命红鸾<br>"
		if dizi(YUE)="子" then YueTianXi="大命天喜<br>"
		if instr(dizi(nian),"子")<>0 then NianTianXi="大命天喜<br>"
		if dizi(SHI)="子" then SHITianXi="大命天喜<br>"		
	end if
	if dizi(shi)="午" then 
		ShiHongLuan="大命红鸾<br>"
		if dizi(YUE)="子" then YueTianXi="大命天喜<br>"
		if instr(ridz,"子")<>0 then RiTianXi="大命天喜<br>"
		if dizi(nian)="子" then nianTianXi="大命天喜<br>"		
	end if
end if

if dizi(dmdz)="未" then
	if dizi(nian)="申" then 
		NianHongLuan="大命红鸾<br>"
		if dizi(YUE)="寅" then YueTianXi="大命天喜<br>"
		if instr(ridz,"寅")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="寅" then SHITianXi="大命天喜<br>"		
	end if
	if dizi(yue)="申" then 
		YueHongLuan="大命红鸾<br>"
		if dizi(Nian)="寅" then nianTianXi="大命天喜<br>"
		if instr(ridz,"寅")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="寅" then SHITianXi="大命天喜<br>"			
	end if
	if instr(ridz,"申")<>0 then 
		riHongLuan="大命红鸾<br>"
		if dizi(YUE)="寅" then YueTianXi="大命天喜<br>"
		if instr(dizi(nian),"寅")<>0 then nianTianXi="大命天喜<br>"
		if dizi(SHI)="寅" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(shi)="申" then 
		ShiHongLuan="大命红鸾<br>"
		if dizi(YUE)="寅" then YueTianXi="大命天喜<br>"
		if instr(ridz,"寅")<>0 then RiTianXi="大命天喜<br>"
		if dizi(nian)="寅" then nianTianXi="大命天喜<br>"			
	end if
end if



if dizi(dmdz)="申" then
	if dizi(nian)="未" then 
		NianHongLuan="大命红鸾<br>"
		if dizi(YUE)="丑" then YueTianXi="大命天喜<br>"
		if instr(ridz,"丑")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="丑" then SHITianXi="大命天喜<br>"		
	end if
	if dizi(yue)="未" then 
		YueHongLuan="大命红鸾<br>"
		if dizi(Nian)="丑" then nianTianXi="大命天喜<br>"
		if instr(ridz,"丑")<>0 then RiTianXi="大命天喜<br>"
		if dizi(SHI)="丑" then SHITianXi="大命天喜<br>"			
	end if
	if instr(ridz,"未")<>0 then 
		riHongLuan="大命红鸾<br>"
		if dizi(YUE)="丑" then YueTianXi="大命天喜<br>"
		if instr(dizi(nian),"丑")<>0 then nianTianXi="大命天喜<br>"
		if dizi(SHI)="丑" then SHITianXi="大命天喜<br>"			
	end if
	if dizi(shi)="未" then 
		ShiHongLuan="大命红鸾<br>"
		if dizi(YUE)="丑" then YueTianXi="大命天喜<br>"
		if instr(ridz,"丑")<>0 then RiTianXi="大命天喜<br>"
		if dizi(nian)="丑" then nianTianXi="大命天喜<br>"			
	end if
end if


'年地支的红鸾天喜

if dizi(nian)="子" then
	if dizi(yue)="卯" then 
		YueHongLuan="(年)红鸾<br>"
		if instr(ridz,"酉")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(SHI)="酉" then SHITianXi="(年)天喜<br>"		
	end if
	if instr(ridz,"卯")<>0 then 
		riHongLuan="(年)红鸾<br>"
		if instr(dizi(YUE),"酉")<>0 then YUETianXi="(年)天喜<br>"
		if dizi(SHI)="酉" then SHITianXi="(年)天喜<br>"			
	end if
	if dizi(shi)="卯" then 
		ShiHongLuan="(年)红鸾<br>"
		if instr(ridz,"酉")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(yue)="酉" then YUETianXi="(年)天喜<br>"			
	end if
end if

if dizi(nian)="卯" then
	if dizi(yue)="子" then 
		YueHongLuan="(年)红鸾<br>"
		if instr(ridz,"午")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(SHI)="午" then SHITianXi="(年)天喜<br>"		
	end if
	if instr(ridz,"子")<>0 then 
		riHongLuan="(年)红鸾<br>"
		if instr(dizi(YUE),"午")<>0 then YUETianXi="(年)天喜<br>"
		if dizi(SHI)="午" then SHITianXi="(年)天喜<br>"			
	end if
	if dizi(shi)="子" then 
		ShiHongLuan="(年)红鸾<br>"
		if instr(ridz,"午")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(yue)="午" then YUETianXi="(年)天喜<br>"			
	end if
end if


if dizi(nian)="寅" then
	if dizi(yue)="丑" then 
		YueHongLuan="(年)红鸾<br>"
		if instr(ridz,"未")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(SHI)="未" then SHITianXi="(年)天喜<br>"			
	end if
	if instr(ridz,"丑")<>0 then 
		riHongLuan="(年)红鸾<br>"
		if dizi(YUE)="未" then YueTianXi="(年)天喜<br>"
		if dizi(SHI)="未" then SHITianXi="(年)天喜<br>"			
	end if
	if dizi(shi)="丑" then 
		ShiHongLuan="(年)红鸾<br>"
		if dizi(YUE)="未" then YueTianXi="(年)天喜<br>"
		if instr(ridz,"未")<>0 then RiTianXi="(年)天喜<br>"
	end if
end if
if dizi(nian)="丑" then
	if dizi(yue)="寅" then 
		YueHongLuan="(年)红鸾<br>"
		if instr(ridz,"申")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(SHI)="申" then SHITianXi="(年)天喜<br>"			
	end if
	if instr(ridz,"寅")<>0 then 
		riHongLuan="(年)红鸾<br>"
		if dizi(YUE)="申" then YueTianXi="(年)天喜<br>"
		if dizi(SHI)="申" then SHITianXi="(年)天喜<br>"			
	end if
	if dizi(shi)="寅" then 
		ShiHongLuan="(年)红鸾<br>"
		if dizi(YUE)="申" then YueTianXi="(年)天喜<br>"
		if instr(ridz,"申")<>0 then RiTianXi="(年)天喜<br>"
	end if
end if

if dizi(nian)="亥" then
	if dizi(yue)="辰" then 
		YueHongLuan="(年)红鸾<br>"
		if instr(ridz,"戌")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(SHI)="戌" then SHITianXi="(年)天喜<br>"			
	end if
	if instr(ridz,"辰")<>0 then 
		riHongLuan="(年)红鸾<br>"
		if dizi(YUE)="戌" then YueTianXi="(年)天喜<br>"
		if dizi(SHI)="戌" then SHITianXi="(年)天喜<br>"			
	end if
	if dizi(shi)="辰" then 
		ShiHongLuan="(年)红鸾<br>"
		if dizi(YUE)="戌" then YueTianXi="(年)天喜<br>"
		if instr(ridz,"戌")<>0 then RiTianXi="(年)天喜<br>"
	end if
end if
if dizi(nian)="辰" then
	if dizi(yue)="亥" then 
		YueHongLuan="(年)红鸾<br>"
		if instr(ridz,"巳")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(SHI)="巳" then SHITianXi="(年)天喜<br>"			
	end if
	if instr(ridz,"亥")<>0 then 
		riHongLuan="(年)红鸾<br>"
		if dizi(YUE)="巳" then YueTianXi="(年)天喜<br>"
		if dizi(SHI)="巳" then SHITianXi="(年)天喜<br>"			
	end if
	if dizi(shi)="亥" then 
		ShiHongLuan="(年)红鸾<br>"
		if dizi(YUE)="巳" then YueTianXi="(年)天喜<br>"
		if instr(ridz,"巳")<>0 then RiTianXi="(年)天喜<br>"
	end if
end if

if dizi(nian)="戌" then
	if dizi(yue)="巳" then 
		YueHongLuan="(年)红鸾<br>"
		if instr(ridz,"亥")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(SHI)="亥" then SHITianXi="(年)天喜<br>"			
	end if
	if instr(ridz,"巳")<>0 then 
		riHongLuan="(年)红鸾<br>"
		if dizi(YUE)="亥" then YueTianXi="(年)天喜<br>"
		if dizi(SHI)="亥" then SHITianXi="(年)天喜<br>"			
	end if
	if dizi(shi)="巳" then 
		ShiHongLuan="(年)红鸾<br>"
		if dizi(YUE)="亥" then YueTianXi="(年)天喜<br>"
		if instr(ridz,"亥")<>0 then RiTianXi="(年)天喜<br>"
	end if
end if
if dizi(nian)="巳" then
	if dizi(yue)="戌" then 
		YueHongLuan="(年)红鸾<br>"
		if instr(ridz,"辰")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(SHI)="辰" then SHITianXi="(年)天喜<br>"			
	end if
	if instr(ridz,"戌")<>0 then 
		riHongLuan="(年)红鸾<br>"
		if dizi(YUE)="辰" then YueTianXi="(年)天喜<br>"
		if dizi(SHI)="辰" then SHITianXi="(年)天喜<br>"			
	end if
	if dizi(shi)="戌" then 
		ShiHongLuan="(年)红鸾<br>"
		if dizi(YUE)="辰" then YueTianXi="(年)天喜<br>"
		if instr(ridz,"辰")<>0 then RiTianXi="(年)天喜<br>"
	end if
end if


if dizi(nian)="午" then
	if dizi(yue)="酉" then 
		YueHongLuan="(年)红鸾<br>"
		if instr(ridz,"卯")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(SHI)="卯" then SHITianXi="(年)天喜<br>"				
	end if
	if instr(ridz,"酉")<>0 then 
		riHongLuan="(年)红鸾<br>"
		if dizi(YUE)="卯" then YueTianXi="(年)天喜<br>"
		if dizi(SHI)="卯" then SHITianXi="(年)天喜<br>"		
	end if
	if dizi(shi)="酉" then 
		ShiHongLuan="(年)红鸾<br>"
		if dizi(YUE)="卯" then YueTianXi="(年)天喜<br>"
		if instr(ridz,"卯")<>0 then RiTianXi="(年)天喜<br>"
	end if
end if
if dizi(nian)="酉" then
	if dizi(yue)="午" then 
		YueHongLuan="(年)红鸾<br>"
		if instr(ridz,"子")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(SHI)="子" then SHITianXi="(年)天喜<br>"				
	end if
	if instr(ridz,"午")<>0 then 
		riHongLuan="(年)红鸾<br>"
		if dizi(YUE)="子" then YueTianXi="(年)天喜<br>"
		if dizi(SHI)="子" then SHITianXi="(年)天喜<br>"		
	end if
	if dizi(shi)="午" then 
		ShiHongLuan="(年)红鸾<br>"
		if dizi(YUE)="子" then YueTianXi="(年)天喜<br>"
		if instr(ridz,"子")<>0 then RiTianXi="(年)天喜<br>"
	end if
end if

if dizi(nian)="未" then
	if dizi(yue)="申" then 
		YueHongLuan="(年)红鸾<br>"
		if dizi(Nian)="寅" then nianTianXi="(年)天喜<br>"
		if instr(ridz,"寅")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(SHI)="寅" then SHITianXi="(年)天喜<br>"			
	end if
	if instr(ridz,"申")<>0 then 
		riHongLuan="(年)红鸾<br>"
		if dizi(YUE)="寅" then YueTianXi="(年)天喜<br>"
		if dizi(SHI)="寅" then SHITianXi="(年)天喜<br>"			
	end if
	if dizi(shi)="申" then 
		ShiHongLuan="(年)红鸾<br>"
		if dizi(YUE)="寅" then YueTianXi="(年)天喜<br>"
		if instr(ridz,"寅")<>0 then RiTianXi="(年)天喜<br>"
	end if
end if
if dizi(nian)="申" then
	if dizi(yue)="未" then
		YueHongLuan="(年)红鸾<br>"
		if instr(ridz,"丑")<>0 then RiTianXi="(年)天喜<br>"
		if dizi(SHI)="丑" then SHITianXi="(年)天喜<br>"			
	end if
	if instr(ridz,"未")<>0 then 
		riHongLuan="(年)红鸾<br>"
		if dizi(YUE)="丑" then YueTianXi="(年)天喜<br>"
		if dizi(SHI)="丑" then SHITianXi="(年)天喜<br>"			
	end if
	if dizi(shi)="未" then 
		ShiHongLuan="(年)红鸾<br>"
		if dizi(YUE)="丑" then YueTianXi="(年)天喜<br>"
		if instr(ridz,"丑")<>0 then RiTianXi="(年)天喜<br>"
	end if
end if


'四柱八煞曜

if instr(dizi(nian)&dizi(yue),"子")<>0 and instr(dizi(nian)&dizi(yue),"辰")<>0 then
	YueBaSa=YueBaSa&"<a title='八煞主意外灾祸、纠纷是非、祸害等。'>年月八煞矅</a><br>"
end if
if instr(dizi(nian)&dizi(yue),"卯")<>0 and instr(dizi(nian)&dizi(yue),"申")<>0 then
	YueBaSa=YueBaSa&"<a title='八煞主意外灾祸、纠纷是非、祸害等。'>年月八煞矅</a><br>"
end if
if instr(dizi(nian)&dizi(yue),"午")<>0 and instr(dizi(nian)&dizi(yue),"亥")<>0 then
	YueBaSa=YueBaSa&"<a title='八煞主意外灾祸、纠纷是非、祸害等。'>年月八煞矅</a><br>"
end if
if instr(dizi(nian)&dizi(yue),"巳")<>0 and instr(dizi(nian)&dizi(yue),"酉")<>0 then
	YueBaSa=YueBaSa&"<a title='八煞主意外灾祸、纠纷是非、祸害等。'>年月八煞矅</a><br>"
end if

if instr(left(ridz,1)&dizi(yue),"子")<>0 and instr(left(ridz,1)&dizi(yue),"辰")<>0 then
	riBaSa=riBaSa&"<a title='八煞主意外灾祸、纠纷是非、祸害等。'>月日八煞矅</a><br>"
end if
if instr(left(ridz,1)&dizi(yue),"卯")<>0 and instr(left(ridz,1)&dizi(yue),"申")<>0 then
	riBaSa=riBaSa&"<a title='八煞主意外灾祸、纠纷是非、祸害等。'>月日八煞矅</a><br>"
end if
if instr(left(ridz,1)&dizi(yue),"午")<>0 and instr(left(ridz,1)&dizi(yue),"亥")<>0 then
	riBaSa=riBaSa&"<a title='八煞主意外灾祸、纠纷是非、祸害等。'>月日八煞矅</a><br>"
end if
if instr(left(ridz,1)&dizi(yue),"巳")<>0 and instr(left(ridz,1)&dizi(yue),"酉")<>0 then
	riBaSa=riBaSa&"<a title='八煞主意外灾祸、纠纷是非、祸害等。'>月日八煞矅</a><br>"
end if

if instr(right(ridz,1)&dizi(shi),"子")<>0 and instr(right(ridz,1)&dizi(shi),"辰")<>0 then
	ShiBaSa=ShiBaSa&"<a title='八煞主意外灾祸、纠纷是非、祸害等。'>日时八煞矅</a><br>"
end if
if instr(right(ridz,1)&dizi(shi),"卯")<>0 and instr(right(ridz,1)&dizi(shi),"申")<>0 then
	ShiBaSa=ShiBaSa&"<a title='八煞主意外灾祸、纠纷是非、祸害等。'>日时八煞矅</a><br>"
end if
if instr(right(ridz,1)&dizi(shi),"午")<>0 and instr(right(ridz,1)&dizi(shi),"亥")<>0 then
	ShiBaSa=ShiBaSa&"<a title='八煞主意外灾祸、纠纷是非、祸害等。'>日时八煞矅</a><br>"
end if
if instr(right(ridz,1)&dizi(shi),"巳")<>0 and instr(right(ridz,1)&dizi(shi),"酉")<>0 then
	ShiBaSa=ShiBaSa&"<a title='八煞主意外灾祸、纠纷是非、祸害等。'>日时八煞矅</a><br>"
end if

allshu=DMDZ							
if dizi(nian)=dizi(allshu) then 
	NianXing=NianXing&"命星<br>"
end if
if dizi(yue)=dizi(allshu) then 
	YueXing=YueXing&"命星<br>"
end if
if instr(ridz,dizi(allshu))<>0 then 
	RiXing=RiXing&"命星<br>"
end if
if dizi(Shi)=dizi(allshu) then 
	ShiXing=ShiXing&"命星<br>"
end if

i=1
a=allshu+24
a=a-1
if a>12 then a=a mod 12
if a=0 then a=12
if dizi(nian)=dizi(a) then 
	NianXing=NianXing&"兄星"
end if
if dizi(yue)=dizi(a) then 
	YueXing=YueXing&"兄星"
end if
if instr(ridz,dizi(a))<>0 then 
	RiXing=RiXing&"兄星"
end if
if dizi(Shi)=dizi(a) then 
	ShiXing=ShiXing&"兄星"
end if
									
a=a+24
a=a-1
if a>12 then a=a mod 12
if a=0 then a=12
if dizi(nian)=dizi(a) then 
	NianXing=NianXing&"妻星"
end if
if dizi(yue)=dizi(a) then 
	YueXing=YueXing&"妻星"
end if
if instr(ridz,dizi(a))<>0 then 
	RiXing=RiXing&"妻星"
end if
if dizi(Shi)=dizi(a) then 
	ShiXing=ShiXing&"妻星"
end if
									
a=a+24
a=a-1
if a>12 then a=a mod 12
if a=0 then a=12
if dizi(nian)=dizi(a) then 
	NianXing=NianXing&"女星"
end if
if dizi(yue)=dizi(a) then 
	YueXing=YueXing&"女星"
end if
if instr(ridz,dizi(a))<>0 then 
	RiXing=RiXing&"女星"
end if
if dizi(Shi)=dizi(a) then 
	ShiXing=ShiXing&"女星"
end if

a=a+24
a=a-1
if a>12 then a=a mod 12
if a=0 then a=12
if dizi(nian)=dizi(a) then 
	NianXing=NianXing&"财星"
end if
if dizi(yue)=dizi(a) then 
	YueXing=YueXing&"财星"
end if
if instr(ridz,dizi(a))<>0 then 
	RiXing=RiXing&"财星"
end if
if dizi(Shi)=dizi(a) then 
	ShiXing=ShiXing&"财星"
end if

a=a+24
a=a-1
if a>12 then a=a mod 12
if a=0 then a=12
if dizi(nian)=dizi(a) then 
	NianXing=NianXing&"病星"
end if
if dizi(yue)=dizi(a) then 
	YueXing=YueXing&"病星"
end if
if instr(ridz,dizi(a))<>0 then 
	RiXing=RiXing&"病星"
end if
if dizi(Shi)=dizi(a) then 
	ShiXing=ShiXing&"病星"
end if

a=a+24
a=a-1
if a>12 then a=a mod 12
if a=0 then a=12
if dizi(nian)=dizi(a) then 
	NianXing=NianXing&"迁星"
end if
if dizi(yue)=dizi(a) then 
	YueXing=YueXing&"迁星"
end if
if instr(ridz,dizi(a))<>0 then 
	RiXing=RiXing&"迁星"
end if
if dizi(Shi)=dizi(a) then 
	ShiXing=ShiXing&"迁星"
end if

a=a+24
a=a-1
if a>12 then a=a mod 12
if a=0 then a=12
if dizi(nian)=dizi(a) then 
	NianXing=NianXing&"友星"
end if
if dizi(yue)=dizi(a) then 
	YueXing=YueXing&"友星"
end if
if instr(ridz,dizi(a))<>0 then 
	RiXing=RiXing&"友星"
end if
if dizi(Shi)=dizi(a) then 
	ShiXing=ShiXing&"友星"
end if
									
a=a+24
a=a-1
if a>12 then a=a mod 12
if a=0 then a=12
if dizi(nian)=dizi(a) then 
	NianXing=NianXing&"业星"
end if
if dizi(yue)=dizi(a) then 
	YueXing=YueXing&"业星"
end if
if instr(ridz,dizi(a))<>0 then 
	RiXing=RiXing&"业星"
end if
if dizi(Shi)=dizi(a) then 
	ShiXing=ShiXing&"业星"
end if

a=a+24
a=a-1
if a>12 then a=a mod 12
if a=0 then a=12
if dizi(nian)=dizi(a) then 
	NianXing=NianXing&"宅星"
end if
if dizi(yue)=dizi(a) then 
	YueXing=YueXing&"宅星"
end if
if instr(ridz,dizi(a))<>0 then 
	RiXing=RiXing&"宅星"
end if
if dizi(Shi)=dizi(a) then 
	ShiXing=ShiXing&"宅星"
end if
									
a=a+24
a=a-1
if a>12 then a=a mod 12
if a=0 then a=12
if dizi(nian)=dizi(a) then 
	NianXing=NianXing&"官星"
end if
if dizi(yue)=dizi(a) then 
	YueXing=YueXing&"官星"
end if
if instr(ridz,dizi(a))<>0 then 
	RiXing=RiXing&"官星"
end if
if dizi(Shi)=dizi(a) then 
	ShiXing=ShiXing&"官星"
end if																	
									
a=a+24
a=a-1
if a>12 then a=a mod 12
if a=0 then a=12
if dizi(nian)=dizi(a) then 
	NianXing=NianXing&"父母星"
end if
if dizi(yue)=dizi(a) then 
	YueXing=YueXing&"父母星"
end if
if instr(ridz,dizi(a))<>0 then 
	RiXing=RiXing&"父母星"
end if
if dizi(Shi)=dizi(a) then 
	ShiXing=ShiXing&"父母星"
end if	
%>

		<tr>
			<td width="25%" height=25 align=center bgcolor=CCFFFF><%=nianXing%></td>
			<td width="25%" height=25 align=center bgcolor=CCFFFF><%=Yuexing%></td>
			<td width="25%" height=25 align=center bgcolor=CCFFFF><%=Rixing%></td>
			<td width="25%" height=25 align=center bgcolor=CCFFFF><%=ShiXing%></td>
		</tr>
		<tr>
			<td width="25%" align=center valign=top><%=nianJiangXing%><%=DmHuaGai%><%=NIANYIMA%><%=NianHongLuan%><%=NianTianXi%></td>
			<td width="25%" align=center valign=top>
				<%=YueTaoHua%><%=YueJiangXing%><%=YueHuaGai%><%=YueJiangMa%>
				<%=YUEYIMA%><%=YueSanSa%><%=YueGuGuaSa%><%=xiaoerguansa(yue,dizi(shi))%>
				<%=QingLongSa(shengxiao(nian),Yue)%><%=YueTianLuoDiWang%><%=YueHongLuan%>
				<%=YueTianXi%><%=YueBaSa%>
			</td>
			<td width="25%" align=center valign=top>
				<%=RiTaoHua%><%=RiJiangXing%><%=RiHuaGai%><%=RiJiangMa%><%=RIYIMA%><%=RISanSa%><%=RIGuGuaSa%>
				<%=RiTianLuoDiWang%><%=riHongLuan%><%=RiTianXi%><%=RiBaSa%>
			</td>
			<td width="25%" align=center valign=top>
				<%=ShiTaoHua%><%=ShiJiangXing%><%=ShiHuaGai%><%=SHIJiangMa%><%=SHISanSa%><%=SHIGuGuaSa%>
				<%=ShiTianLuoDiWang%><%=ShiHongLuan%><%=SHITianXi%><%=ShiBaSa%>
			</td>
		</tr>
		<tr>
			<td width="25%" align=center valign=top></td>
			<td width="25%" align=center valign=top>
				　</td>
			<td width="25%" align=center valign=top>
				　</td>
			<td width="25%" align=center valign=top>
				　</td>
		</tr>
	


		<tr>
			<td   align=center valign=top colspan="4">
			<div align="center">
				<table border="0" cellpadding="3" cellspacing="0" width="100%" id="table7">
					<tr>
						<td colspan="3"><hr size=1></td>
					</tr>
					<tr>
						<td><font color=003366>地支相冲:<%=XiangChong(dizi(nian),dizi(yue),ridz,dizi(shi))%>　</font></td>
						<td><font color=red>地支相刑:<%=XiangXing(dizi(nian),dizi(yue),ridz,dizi(shi))%>　</font></td>
						<td><font color=003366>地支三合:<%=ShanHe(dizi(nian),dizi(yue),ridz,dizi(shi))%>　</font></td>
					</tr>
					<tr>
						<td><font color=red>地支六合:<%=LuHe(dizi(nian),dizi(yue),ridz,dizi(shi))%>　</font></td>
						<td><font color=003366>地支相害:<%=XiangHai(dizi(nian),dizi(yue),ridz,dizi(shi))%>　</font></td>
						<td><font color=red>地支三会:<%=SanHui(dizi(nian),dizi(yue),ridz,dizi(shi))%>　</font></td>
					</tr>
				</table>
			</div>
			</td>
		</tr>
	


		<tr>
			<td   valign=top colspan="4">
				<hr size=1>
			</td>
		</tr>
	


		<tr>
			<td   valign=top colspan="4">
						<%
				'看日时的生克关系
				if instr(riwx,"金")<>0 and instr(wuxing(shi),"木")<>0 then Response.Write "容易腿麻 "
				if instr(riwx,"土")<>0 and instr(wuxing(shi),"水")<>0 then Response.Write "容易腿凉 "
				if instr(riwx,"木")<>0 and instr(wuxing(shi),"土")<>0 then Response.Write "容易腿抽筋 "
				if instr(riwx,"水")<>0 and instr(wuxing(shi),"火")<>0 then Response.Write "容易腿酸痛 "
				if instr(riwx,"火")<>0 and instr(wuxing(shi),"金")<>0 then Response.Write "容易腿风湿性疼痛 "
				
				if instr(wuxing(yue),"金")<>0 and instr(wuxing(shi),"木")<>0 and xb="女" then Response.Write "容易流产 "
				if instr(wuxing(yue),"土")<>0 and instr(wuxing(shi),"水")<>0 and xb="女" then Response.Write "容易流产 "
				if instr(wuxing(yue),"木")<>0 and instr(wuxing(shi),"土")<>0 and xb="女" then Response.Write "容易流产 "
				if instr(wuxing(yue),"水")<>0 and instr(wuxing(shi),"火")<>0 and xb="女" then Response.Write "容易流产 "
				if instr(wuxing(yue),"火")<>0 and instr(wuxing(shi),"金")<>0 and xb="女" then Response.Write "容易流产 "
				
				if instr(wuxing(yue),"木")<>0 and instr(wuxing(shi),"金")<>0 and xb="女" then Response.Write "容易难产 "
				if instr(wuxing(yue),"水")<>0 and instr(wuxing(shi),"土")<>0 and xb="女" then Response.Write "容易难产 "
				if instr(wuxing(yue),"土")<>0 and instr(wuxing(shi),"木")<>0 and xb="女" then Response.Write "容易难产 "
				if instr(wuxing(yue),"火")<>0 and instr(wuxing(shi),"水")<>0 and xb="女" then Response.Write "容易难产 "
				if instr(wuxing(yue),"金")<>0 and instr(wuxing(shi),"火")<>0 and xb="女" then Response.Write "容易难产 "
				
				if ( yue="1" or yue="2" or yue="3" or yue="4" or yue="5" or yue="11" or yue="12" ) and ( shi="1" or shi="2" or shi="3" or shi="4" or shi="5" or shi="11" or shi="12" ) then Response.Write "第一胎男孩子 " 
				if ( yue="6" or yue="7" or yue="8" or yue="9" or yue="10" ) and ( shi="6" or shi="7" or shi="8" or shi="9" or shi="10") then Response.Write "第一胎女孩子 " 
				
				
				duixiang=clng(replace(riDuiXiang-yue,"-",""))
				if clng(riduixiang)=clng(yue) then DuiXiang=yue
				if duixiang>6 then duixiang=duixiang-5
				Response.Write "<font color=red title='此项用于1980年后出生有效'>谈对象至少有"&duixiang&"位</font> "
				%>
			</td>
		</tr>
		<tr>
			<td bgcolor=CCFFFF colspan=4 height=25>
			
			<%=BaiHuSa(dizi(nian),dizi(yue),ridz,dizi(shi))%>　
			<b><%=TianSaGuXing(dizi(nian),yue,xb)%></b>
			<%
			y=clng(year(now()) mod 60 )
			if y<4 then y=y+60
			y=y-4
			NTianGan=nianGZ(Y)
			NDiZi=right(NTianGan,1)
			'NDiZi="子"
			Response.Write LiuNianSanSa(NDiZi)
			
			%>
			
			</td>
		</tr>
	


		<tr>
			<td colspan=4>
			<div align="center">
				<table border="0" cellpadding="5" cellspacing="0"  id="table8">
					<tr>
						<td width="25%" align="center">年 <%=dizi(nian)%></td>
						<td width="25%" align="center">月 <%=dizi(yue)%></td>
						<td width="25%" align="center">日 <%=RIDZ%></td>
						<td width="25%" align="center">时 <%=dizi(shi)%></td>
					</tr>
					<tr>
						<td width="25%" align="center">相冲:<%=XiangChongDizi(dizi(nian))%></td>
						<td width="25%" align="center">相冲:<%=XiangChongDizi(dizi(yue))%></td>
						<td width="25%" align="center">相冲:<%=XiangChongDizi(ridz)%></td>
						<td width="25%" align="center">相冲:<%=XiangChongDizi(dizi(shi))%></td>
					</tr>
					<tr>
						<td width="25%" align="center">相刑:<%=XiangXingDizi(dizi(nian))%></td>
						<td width="25%" align="center">相刑:<%=XiangXingDizi(dizi(yue))%></td>
						<td width="25%" align="center">相刑:<%=XiangXingDizi(ridz)%></td>
						<td width="25%" align="center">相刑:<%=XiangXingDizi(dizi(shi))%></td>
					</tr>
					<tr>
						<td width="25%" align="center">相害:<%=XiangHaiDizi(dizi(nian))%></td>
						<td width="25%" align="center">相害:<%=XiangHaiDizi(dizi(yue))%></td>
						<td width="25%" align="center">相害:<%=XiangHaiDizi(ridz)%></td>
						<td width="25%" align="center">相害:<%=XiangHaiDizi(dizi(shi))%></td>
					</tr>
				</table>
			</div>
			</td>
		</tr>
	


	</table>
</div>
<%
Response.flush 
%>
		
			</td>
			<td  >

			</td>
		</tr>
</table>
	<img border="0" src="images/TaiJI22.jpg" width="360" >

	<div style="width:99%;margin:0 auto;">
 							十二宫
							<%
							allshu=clng(nian)+clng(yue)+clng(ri)+clng(shi)
							allshu=allshu mod 12
							if allshu=0 then allshu=12
							allshu=DMDZ
							bamendizi=dizi(allshu)
							shierGong=allshu
							Response.Write "余"&allshu&"　八门余"&bms&"<br>"
							
							Response.Write "命："&dizi(allshu)&"("&BuBaMenGua(dizi(allshu))&")<br>"

									i=1
									a=allshu+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									Response.Write "兄："&dizi(a)&"("&BuBaMenGua(dizi(a))&")<br>"
									
									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									Response.Write "妻："&dizi(a)&"("&BuBaMenGua(dizi(a))&")<br>"
									
									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									Response.Write "女："&dizi(a)&"("&BuBaMenGua(dizi(a))&")<br>"

									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									Response.Write "财："&dizi(a)&"("&BuBaMenGua(dizi(a))&")<br>"

									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									Response.Write "病："&dizi(a)&"("&BuBaMenGua(dizi(a))&")<br>"

									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									Response.Write "迁："&dizi(a)&"("&BuBaMenGua(dizi(a))&")<br>"

									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									Response.Write "友："&dizi(a)&"("&BuBaMenGua(dizi(a))&")<br>"
									
									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									Response.Write "业："&dizi(a)&"("&BuBaMenGua(dizi(a))&")<br>"

									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									Response.Write "宅："&dizi(a)&"("&BuBaMenGua(dizi(a))&")<br>"
									
									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									Response.Write "官星："&dizi(a)&"("&BuBaMenGua(dizi(a))&")<br>"																		
									
									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									Response.Write "父母："&dizi(a)&"("&BuBaMenGua(dizi(a))&")<br>"									
							%>		
	</div>
<table width="100%" border=0 cellspacing="0" cellpadding="0">
		<tr>
			<td>
			<div align="center">
				<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table4">
					<tr>
						
						<td  ></td>
						<td>
						<div align="center">
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td width=204 height=204>
									<div align="center">
										<table border="1" cellpadding="0" width="204" height=204 background='images/<%=shierGong%>.gif' style="border-collapse: collapse" bordercolor="#808080">
											<tr>
												<td width=204 height=204 background='images/b<%=bms%>.gif' align=center>十二宫八门</td>
											</tr>
										</table>
									</div>
									</td>
									<td width=10></td>
									<td>
						　</td>
									<%
									Set objChinaDay = New ChinaDay 
										cddd=date()
									Call objChinaDay.Action(cddd,sDay,sWeekDay,sChinaYear,sChinaDay,sChinaAni) 
									Set objChinaDay = Nothing
									TT=left(sChinaYear,1)
									DD=left(right(sChinaYear,2),1)
									AllShu=clng(TianGanFC(TT))+clng(DiziFC(DD))
									allshu=allshu mod 12
									if allshu=0 then allshu=12
									%>
									<td width=204 height=204>
									<div align="center">
										<table border="1" background='images/<%=shierGong%>.gif' cellpadding="0" width="204" height=204 style="border-collapse: collapse" bordercolor="#808080">
											<tr>
												<td width=204 height=204 background='images/b<%=allshu%>.gif' align=center valign=center><%=year(now())%>年<br>流年八门</td>
											</tr>
										</table>
									</div>
									</td>
									<td width=10></td>
									<%
									Set objChinaDay = New ChinaDay 
										cddd=year(now())+1&"-5-5"
									Call objChinaDay.Action(cddd,sDay,sWeekDay,sChinaYear,sChinaDay,sChinaAni) 
									Set objChinaDay = Nothing
									TT=left(sChinaYear,1)
									DD=left(right(sChinaYear,2),1)
									AllShu=clng(TianGanFC(TT))+clng(DiziFC(DD))
									allshu=allshu mod 12
									if allshu=0 then allshu=12
									%>
									<td width=204 height=204>
									<div align="center">
										<table border="1" background='images/<%=shierGong%>.gif' cellpadding="0" width="204" height=204 style="border-collapse: collapse" bordercolor="#808080">
											<tr>
												<td width=204 height=204 background='images/b<%=allshu%>.gif' align=center valign=center><%=year(now())+1%>年<br>流年八门</td>
											</tr>
										</table>
									</div>
									</td>

								</tr>
							</table>
						</div>
　</td>
					</tr>
				</table>
			</div>
			</td>
		</tr>
		<tr>
			<td>
<div align="center">
	<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table5">
		<tr>
			<%
			for yy=0 to 8
			%>
			<td><%=year(now())+yy%>流年八门:<br>
							<%
							
							Set objChinaDay = New ChinaDay 
								cddd=year(now())+yy&"-5-5"
							Call objChinaDay.Action(cddd,sDay,sWeekDay,sChinaYear,sChinaDay,sChinaAni) 
							Set objChinaDay = Nothing
							Response.Write sChinaYear
							TT=left(sChinaYear,1)
							DD=left(right(sChinaYear,2),1)
							AllShu=clng(TianGanFC(TT))+clng(DiziFC(DD))
							allshu=allshu mod 12
							if allshu=0 then allshu=12
							bamendizi=dizi(allshu)
							if allshu="1" or allshu="3" or allshu="5" or allshu="7" or allshu="9" or allshu="11" then paibamen="顺"
							if allshu="2" or allshu="4" or allshu="6" or allshu="8" or allshu="10" or allshu="12" then paibamen="逆"
							
							Response.Write "余"&allshu&bamendizi&"<br>"
							
							Response.Write "生门："&BuBaMenGua2(allshu)&"<br>"
									i=1
									a=allshu+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									if a=11 or a=8 or a=5 or a=2 then a=a-1
									Response.Write "伤门："&BuBaMenGua2(a)&"<br>"
									
									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									if a=11 or a=8 or a=5 or a=2 then a=a-1
									Response.Write "杜门："&BuBaMenGua2(a)&"<br>"
									
									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									if a=11 or a=8 or a=5 or a=2 then a=a-1
									Response.Write "景门："&BuBaMenGua2(a)&"<br>"

									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									if a=11 or a=8 or a=5 or a=2 then a=a-1
									Response.Write "死门："&BuBaMenGua2(a)&"<br>"

									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									if a=11 or a=8 or a=5 or a=2 then a=a-1
									Response.Write "惊门："&BuBaMenGua2(a)&"<br>"

									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									if a=11 or a=8 or a=5 or a=2 then a=a-1
									Response.Write "开门："&BuBaMenGua2(a)&"<br>"

									a=a+24
									a=a-1
									if a>12 then a=a mod 12
									if a=0 then a=12
									if a=11 or a=8 or a=5 or a=2 then a=a-1
									Response.Write "休门："&BuBaMenGua2(a)&"<br>"
							%></td>
							<%
							next
							%>
		</tr>
	</table>
</div>
			</td>
		</tr>
	</table>
</div>
<img border="0" src="images/bazi01.jpg" style="width:100%" >
<img border="0" src="images/bazi02.jpg" >
<hr size=1>
<center>由 子陵先生 徐广皓 余阡正 于2008年8月 共同完成　　Email:alanxua@msn.com</center>
</body>

</html>